package com.huawei.gamebox.service.welfare.campaign.card;

import android.content.Context;
import com.huawei.appgallery.foundation.ui.framework.cardkit.bean.CardBean;
import com.huawei.gamebox.service.common.cardkit.bean.BaseGsCardBean;
import com.huawei.gamebox.service.common.cardkit.card.BaseGsCard;
import com.huawei.gamebox.service.welfare.common.bean.AbsWithTitleCardBean;
import com.huawei.gamebox.service.welfare.common.card.AbsWithTitleCard;

public class CampaignWithTitleCard extends AbsWithTitleCard {
    public CampaignWithTitleCard(Context context) {
        super(context);
    }

    public void ˏ(CardBean cardBean) {
        int size;
        super.ˏ(cardBean);
        AbsWithTitleCardBean absWithTitleCardBean = (AbsWithTitleCardBean) cardBean;
        if (absWithTitleCardBean.ˊ() != null) {
            size = absWithTitleCardBean.ˊ().size();
        } else {
            size = 0;
        }
        int ˎ = ˎ();
        String ʼ = ʼ();
        for (int i = 0; i < ˎ; i++) {
            BaseGsCard ˋ = ˋ(i);
            if (ˋ != null && (ˋ instanceof BaseCampaignCard)) {
                BaseCampaignCard baseCampaignCard = (BaseCampaignCard) ˋ;
                if (i >= size) {
                    baseCampaignCard.ˉ().setVisibility(8);
                } else {
                    baseCampaignCard.ˉ().setVisibility(0);
                    BaseGsCardBean baseGsCardBean = (BaseGsCardBean) absWithTitleCardBean.ˊ().get(i);
                    baseGsCardBean.ˋˋ(cardBean.ॱˉ());
                    baseCampaignCard.ॱ(ʼ);
                    baseCampaignCard.ˏ((CardBean) baseGsCardBean);
                }
            }
        }
    }
}
